package cn.oa.bean.vo;

import java.util.HashMap;

public class ResultMessage extends HashMap<String,Object>{
	private static final String SUCCESS = "success";
	private static final String MESSAGE = "message";
	public ResultMessage() {}
	public ResultMessage(Boolean success) {
		setSuccess(success);
	}
	public ResultMessage(Boolean success,String message) {
		this(success);
		setMessage(message);
	}
	
	
	public void setSuccess(String message) {
		this.put(MESSAGE, message);
		
	}

	public void setMessage(String message) {
		
		this.put(MESSAGE, message);
	}
	
	public String getMessage() {
		return (String) this.get(MESSAGE);
		
	}
	public void setSuccess(Boolean success) {
		this.put(SUCCESS, success);
		
	}
	public Boolean isSuccess() {
		if(!this.containsKey(SUCCESS)|| this.get(SUCCESS)==null) {
			return false;
		}
		return (boolean)this.get(SUCCESS);
	}

}
